<template>
	<view>
		<view class="bw-trumpet">
			<text class="iconfont icon-laba laba"></text>
			<view>
				<swiper class="swiper" :indicator-dots="false" :autoplay="true" :interval="interval"
					:duration="duration" :vertical="vertical">
					<swiper-item v-for="(a_item,a_index) in lists" :kay="a_index">
						<view>{{a_item}}</view>
					</swiper-item>
				</swiper>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		props: {
			lists: { //喇叭播放内容
				type: Array,
				default: ['测试数据一', '测试数据二', '测试数据三', '测试数据四']
			},
			interval: { //自动切换时间间隔
				type: Number,
				default: 2000
			},
			duration: { //切换动画时长
				type: Number,
				default: 500
			},
			vertical: { //false横向播放 true纵向播放
				type: Boolean,
				default: true
			}
		}
	}
</script>

<style scoped lang="scss">
	@import "../../iconfont.scss";

	.bw-trumpet {
		width: 100%;
		height: 60rpx;
		padding-top: 10rpx;
		padding-bottom: 8rpx;
		background-color: #faf0f4;
		display: flex;
		align-items: center;

		.laba {
			color: #fd1470;
			padding-left:5rpx;
		}

		view {
			width: 100%;
			height: 50rpx;
			font-size: 27rpx;
			margin-left: 15rpx;
			padding-top: 5rpx;
			padding-bottom: 5rpx;
			color: #fd1470;

		}
	}

	.swiper {
		width: 100%;
		height: 42rpx;
	}
</style>
